// 快速排序
void QuickSort(int* array, int lfs, int rhs)
{
    if(lfs >= rhs) return;

    int left = lfs;
    int right = rhs;
    int key = array[left];

    while (left < right) {
        while (left < right && key <= array[right]) {
            right--;
        }
        array[left] = array[right];
        while (left < right && key >= array[left]) {
            left++;
        }
        array[right] = array[left];
    }
    array[left] = key;

    QuickSort(array, lfs, left-1);
    QuickSort(array, right+1, rhs);

}